/*
* Copyright (C) 2005-2013 University of Sydney
*
* Licensed under the GNU License, Version 3.0 (the "License"); you may not use this file except
* in compliance with the License. You may obtain a copy of the License at
*
* http://www.gnu.org/licenses/gpl-3.0.txt
*
* Unless required by applicable law or agreed to in writing, software distributed under the License
* is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
* or implied. See the License for the specific language governing permissions and limitations under
* the License.
*/

/**
* brief description of file
*
* @author      Tom Murtagh
* @author      Kim Jackson
* @author      Ian Johnson   <ian.johnson@sydney.edu.au>
* @author      Stephen White   <stephen.white@sydney.edu.au>
* @author      Artem Osmakov   <artem.osmakov@sydney.edu.au>
* @copyright   (C) 2005-2013 University of Sydney
* @link        http://Sydney.edu.au/Heurist
* @version     3.1.0
* @license     http://www.gnu.org/licenses/gpl-3.0.txt GNU License 3.0
* @package     Heurist academic knowledge management system
* @subpackage  !!!subpackagename for file such as Administration, Search, Edit, Application, Library
*/
/*
 * filename, brief description, date of creation, by whom
 * @copyright (C) 2005-2010 University of Sydney Digital Innovation Unit.
 * @link: http://HeuristScholar.org
 * @license http://www.gnu.org/licenses/gpl-3.0.txt
 * @package Heurist academic knowledge management system
 * @todo
 */

.autocomplete {
	position: absolute;
	min-width: 10em;
	max-width: 20em;
/*	border: 1px solid gray;
*/	background-color: RGBA(0,0,0,0.7);
	padding: 1px;
	cursor: default;
	border-radius: 5px;
	box-shadow:0px 1px 3px RGBA(0,0,0,0.5);
}

.autocomplete .option {
	white-space: nowrap;
	overflow: hidden;
	display:block;
	line-height: 1.2em;
	vertical-align: middle;
	padding: 2px;
	cursor: pointer;
	color:#CCC;
}


/* This is the colour that the "selected" option will be (the one selected by up/down arrow keys) */
div.autocomplete .option.selected {
	background-color: #000;
	color:#FFF;
}

/* This is the colour that the "hovered" option will be (the one selected by the mouse).
   This WAS a slightly paler version of the "selected" background colour, but ...
   Oh man, time for a rant:
   Note that the "selected" option (see above) and the "hovered" option are different --
   we're getting CSS to do as much work as possible to keep the code clean.
   IJ is upset (to the tune of an URGENT JOB) that somebody who mouses over an option,
   and then hits ENTER, will generally not select the option they expected.
   To re-cap: somebody types part of a word, then moves their right hand to the mouse,
   moves the mouse down the list, then -- rather than clicking the left mouse button --
   moves their right hand back to the keyboard and presses enter, expecting that the highlighted
   option is going to be inserted.
   I agree that in these circumstances, the code definitely does the wrong thing ... but what
   BLOODY MANIAC is moving their hand back and forth like that!  I THINK WE ALL KNOW THAT THERE'S
   ONLY ONE PERSON IN THE WORLD WHO MOVES THEIR HAND BACK AND FORTH THAT MUCH WHILE USING HEURIST.

   So, that's why we make the background-color of the hovered option WHITE.  This way it appears
   that there is no selected option unless the user clicks.
 */

.autocomplete div.option:hover {
	background-color: #000;    /* see also div.autocomplete:hover div.option.selected:hover */
	/*background-color: inherit;*/
	color:#FFF;
}

/* very confusing if the selected option (keyboard input) and the hovered option (mouse input)
 * are showing at the same time ... hide the keyboard selection if the mouse is in motion
 */
div.autocomplete:hover .option.selected {
	background-color: white;
}
div.autocomplete:hover div.option.selected:hover {
	/* background-color: #d4bfbf;    see also .autocomplete div.option:hover */
	background-color: inherit;
}


span.invisibleTextbox {
	/* autocomplete magic stuff ... do not change */
	position: absolute;
	visibility: hidden;
	padding-left: 4px;
	font-size: 11px;
	font-size-adjust: none;
}


div.confirmImg {
	position: absolute;
	cursor: default;
	width: 136px;
	background-color: RGBA(0,0,0,0.7);
	padding: 1px;
	cursor: default;
	z-index: 999;
	border-radius: 5px;
	box-shadow:0px 1px 3px RGBA(0,0,0,0.5);
/*	background-image: url(../images/confirm-change.png);
*/}
div.confirmImg ul{
	padding:0;
	margin:0;
}
div.confirmImg li.option div{
	display: inline-block;
    text-align: center;
    width: 25px;
}
div.confirmImg li.option {
	cursor: pointer;
	color:#CCC;
	display:block;
	line-height:14px;
	list-style:none;
	padding:0 5px;
}
div.confirmImg li.option:hover {
	background-color:#000;
	color:#FFF;
	}
